3.163 \(\int (a+b \sec (c+d x)) \sin (c+d x) \, dx\)

Optimal. Leaf size=26 \[ -\frac{a \cos (c+d x)}{d}-\frac{b \log (\cos (c+d x))}{d} \]

[Out]

-((a*Cos[c + d*x])/d) - (b*Log[Cos[c + d*x]])/d

________________________________________________________________________________________

Rubi [A]  time = 0.0329812, antiderivative size = 26, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.176, Rules used = {3872, 2721, 43} \[ -\frac{a \cos (c+d x)}{d}-\frac{b \log (\cos (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Sec[c + d*x])*Sin[c + d*x],x]

[Out]

-((a*Cos[c + d*x])/d) - (b*Log[Cos[c + d*x]])/d

Rule 3872

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[((g*C
os[e + f*x])^p*(b + a*Sin[e + f*x])^m)/Sin[e + f*x]^m, x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]

Rule 2721

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[(x^p*(a + x)^m)/(b^2 - x^2)^((p + 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && NeQ[a^2
 - b^2, 0] && IntegerQ[(p + 1)/2]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin{align*} \int (a+b \sec (c+d x)) \sin (c+d x) \, dx &=-\int (-b-a \cos (c+d x)) \tan (c+d x) \, dx\\ &=\frac{\operatorname{Subst}\left (\int \frac{-b+x}{x} \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=\frac{\operatorname{Subst}\left (\int \left (1-\frac{b}{x}\right ) \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=-\frac{a \cos (c+d x)}{d}-\frac{b \log (\cos (c+d x))}{d}\\ \end{align*}

Mathematica [A]  time = 0.0258105, size = 37, normalized size = 1.42 \[ \frac{a \sin (c) \sin (d x)}{d}-\frac{a \cos (c) \cos (d x)}{d}-\frac{b \log (\cos (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sec[c + d*x])*Sin[c + d*x],x]

[Out]

-((a*Cos[c]*Cos[d*x])/d) - (b*Log[Cos[c + d*x]])/d + (a*Sin[c]*Sin[d*x])/d

________________________________________________________________________________________

Maple [A]  time = 0.018, size = 28, normalized size = 1.1 \begin{align*}{\frac{b\ln \left ( \sec \left ( dx+c \right ) \right ) }{d}}-{\frac{a}{d\sec \left ( dx+c \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sec(d*x+c))*sin(d*x+c),x)

[Out]

1/d*b*ln(sec(d*x+c))-1/d*a/sec(d*x+c)

________________________________________________________________________________________

Maxima [A]  time = 0.983567, size = 31, normalized size = 1.19 \begin{align*} -\frac{a \cos \left (d x + c\right ) + b \log \left (\cos \left (d x + c\right )\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))*sin(d*x+c),x, algorithm="maxima")

[Out]

-(a*cos(d*x + c) + b*log(cos(d*x + c)))/d

________________________________________________________________________________________

Fricas [A]  time = 1.72309, size = 59, normalized size = 2.27 \begin{align*} -\frac{a \cos \left (d x + c\right ) + b \log \left (-\cos \left (d x + c\right )\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))*sin(d*x+c),x, algorithm="fricas")

[Out]

-(a*cos(d*x + c) + b*log(-cos(d*x + c)))/d

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \sec{\left (c + d x \right )}\right ) \sin{\left (c + d x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))*sin(d*x+c),x)

[Out]

Integral((a + b*sec(c + d*x))*sin(c + d*x), x)

________________________________________________________________________________________

Giac [A]  time = 1.29375, size = 43, normalized size = 1.65 \begin{align*} -\frac{a \cos \left (d x + c\right )}{d} - \frac{b \log \left (\frac{{\left | \cos \left (d x + c\right ) \right |}}{{\left | d \right |}}\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))*sin(d*x+c),x, algorithm="giac")

[Out]

-a*cos(d*x + c)/d - b*log(abs(cos(d*x + c))/abs(d))/d